package olga.gorbatiuk.perdep.sorting.sort;

/**
 * @author Olga Gorbatiuk
 */
public abstract class AbstractSort implements Sort {

    protected int[] swap(int firstIndex, int secondIndex, int[] array) {
        if (array[firstIndex] > array[secondIndex]) {
            int temp = array[secondIndex];
            array[secondIndex] = array[firstIndex];
            array[firstIndex] = temp;
        }
        return array;
    }
}
